import wsgiref.handlers
from google.appengine.ext import webapp

html = '''
<html>
<head>
    <title>UClickr</title>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script>
    <script type="text/javascript" src="/ucr.js"></script>
    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
</head>
<body>
<h1>GAE app</h1>

<script type="text/javascript">
document.write(sid);
</script>
</body>
</html>
'''

class MainPage(webapp.RequestHandler):
    def get(self):
        self.response.headers['Content-Type'] = 'text/html'
        self.response.out.write(html)

def main():
    application = webapp.WSGIApplication(
        [('/', MainPage)],
        debug=True)
    wsgiref.handlers.CGIHandler().run(application)

if __name__ == "__main__":
    main()
